#pragma once
#include <QThread>
#include "CameraWorker.h"

class CameraThread : public QThread
{
    Q_OBJECT
public:
    CameraThread(int cameraId,
                 QMutex *mutex,
                 QWaitCondition *trigger,
                 QObject *parent = nullptr);
    ~CameraThread();
    void requestStop();

signals:
    void frameReady(const QImage &img);

protected:
    void run() override;

private:
    CameraWorker *m_worker = nullptr;
};
